<div class="jimu-popup" style="display: none;">
    <div id="image-modal" class="modal" tabindex="-1" data-backdrop="static" data-keyboard="false" style="display: none;">
        <!--:if (image == null || image.id == null) {-->
        <form id="image" class="form-horizontal" action="insert.html" method="post">
            <!--:} else {-->
            <form id="image" class="form-horizontal" action="update.html" method="post">
                <!--:}-->
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <!--:if (image == null || image.id == null) {-->
                        <h3>新建映像</h3>
                        <!--:} else {-->
                        <h3>编辑映像</h3>
                        <!--:}-->
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label for="id" class="col-sm-2 control-label">ID</label>
                            <div class="col-sm-10">
                                <!--:if (image == null || image.id == null) {-->
                                <input id="id" name="id" placeholder="10位字符串，确定后不可修改" class="form-control" type="text" value="${image.id!}"/>
                                <!--:} else {-->
                                <input id="id" name="id" type="hidden" value="${image.id!}"/><p class="form-control-static">${image.id!}</p>
                                <!--:}-->
                            </div>
                        </div>            
                        <div class="form-group">
                            <label for="name" class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-10">
                                <input id="name" name="name" placeholder="映像名称" class="form-control" type="text" value="${image.name!}"/>
                            </div>
                        </div>            
                        <div class="form-group">
                            <label for="status" class="col-sm-2 control-label">状态</label>
                            <div class="col-sm-10">
                                <select id="status" name="status" class="selectpicker show-tick form-control">
                                    <option value="available">可用</option>
                                    <option value="deleted">不可用</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="processorType" class="col-sm-2 control-label">处理器类型</label>
                            <div class="col-sm-10">
                                <select id="processorType" name="processorType" class="selectpicker show-tick form-control">
                                    <option value="32bit">32位</option>
                                    <option value="64bit">64位</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="spaceSize" class="col-sm-2 control-label">容量</label>
                            <div class="col-sm-8">
                                <input id="spaceSize" name="spaceSize" class="selectsider form-control" data-slider-min="0" data-slider-max="100" data-slider-step="10" data-slider-value="${image.spaceSize!20}" value="${image.spaceSize!20}"/>
                            </div>
                            <div class="col-sm-2">
                                <span id="spaceSize-val" class="form-control">${image.spaceSize!20}G</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="visibility" class="col-sm-2 control-label">可视范围</label>
                            <div class="col-sm-10">
                                <select id="visibility" name="visibility" class="selectpicker show-tick form-control">
                                    <option value="public">公用</option>
                                    <option value="private">私有</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="platform" class="col-sm-2 control-label">平台</label>
                            <div class="col-sm-10">
                                <select id="platform" name="platform" class="selectpicker show-tick form-control">
                                    <option value="windows">Windows</option>
                                    <option value="linux">Linux</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="description" class="col-sm-2 control-label">描述</label>
                            <div class="col-sm-10">
                                <textarea id="description" name="description" class="form-control" rows="3" placeholder="模板描述255个字以内">${image.description!}</textarea>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button id="image-form-submit" type="button" class="btn btn-default" onclick="$('#image').ajaxLoad();">提交</button>
                        <button type="button" data-dismiss="modal" class="btn btn-primary">关闭</button>
                    </div>   
                </div>
            </form>

    </div>
</div>
<script>
                            $("#spaceSize").on("slide", function(slideEvt) {
                                $("#spaceSize-val").text(slideEvt.value + "G");
                            });

//                        $("#image-form-submit").on("click", function() {
//                            $("#image").ajaxLoad();
//                        });
</script>    
